package pers.kevin.fsm.operation;

import java.io.File;

import pers.kevin.fsm.utils.FileUtil;

public class OperationLs extends Operation{
    
    @Override
    public String getResult() {
       StringBuilder sb = new StringBuilder();
       File[] listFilesInfo = null;
       listFilesInfo = FileUtil.listFilesInfo(DEFAULT_DIR);
       for (File file : listFilesInfo) {
          sb.append(file.getName() + "[" + (file.isDirectory()? "directory" : "file" ) + "]\t   |    ");
       }
       return sb.toString();
    }
    

}
